﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Microsoft.Practices.Unity;
using Vit.Common;

namespace Vit.Web.Modules
{
    public interface IModule
    {
        string Name { get; }
        string Title { get; }
        string Description { get; }
        string Logo { get; }
        Version Version { get; }
        string Licence { get; }
        string ReleaseNote { get; }
        DateTime ReleaseDate { get; }
        string Owner { get; }
        string Organization { get; }
        string SiteUrl { get; }
        string Email { get; }
        decimal? Fee { get; }

        bool OnInstalling(object sender, ModuleEventArg e, out string message);
        bool OnInstalled(object sender, ModuleEventArg e, out string message);
        bool OnUpdating(object sender, ModuleEventArg e, out string message);
        bool OnUpdated(object sender, ModuleEventArg e, out string message);
        bool OnUnInstalling(object sender, ModuleEventArg e, out string message);
        bool OnUnInstalled(object sender, ModuleEventArg e, out string message);
        bool OnPackaging(object sender, ModuleEventArg e, out string message);
        bool OnUnPackaging(object sender, ModuleEventArg e, out string message);

        void OnApplicationStart(HttpApplication application, IUnityContainer unity);
        void OnApplicationEnd(HttpApplication application, IUnityContainer unity);
        void OnSessionStart(HttpApplication application, IUnityContainer unity);
        void OnSessionEnd(HttpApplication application, IUnityContainer unity);
        void OnBeginRequest(HttpApplication application, IUnityContainer unity);
        void OnEndRequest(HttpApplication application, IUnityContainer unity);
    }
}
